<?php

namespace App\Admin\Traits;

trait ModelForm
{
    // public function show($id)
    // {
    //     return $this->edit($id);
    // }

    public function show($id)
    {
        return redirect()->action(
            '\\' . trim(static::class, '\\') . '@edit', ['id' => $id]
        );
    }

    public function update($id)
    {
        return $this->form()->update($id);
    }

    public function destroy($id)
    {
        return $this->form()->destroy($id);
    }

    public function store()
    {
        return $this->form()->store();
    }
}